/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package clases;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 *
 * @author Miguel_
 */
@Entity
@Table(name = "USUARIO")
public class Usuario implements Serializable {
    
    private Integer id;
    private String nombre;
    private String email;
    private String pass;
    
    public Usuario(){}
    
    public Usuario(String n, String e, String p)
    {
        nombre = n;
        email = e;
        pass = p;
    }

    @TableGenerator(
    name="US_GEN",
    table="JPA_WXS_APP_SEQUENCE_GENERATOR",
    pkColumnName="GEN_KEY",
    valueColumnName="GEN_VALUE",
    pkColumnValue="USUARIO_ID",
    allocationSize=1,
    initialValue= 0 )
    @Id
    @GeneratedValue(strategy=GenerationType.TABLE,generator="US_GEN")
    @Column(name = "ID", nullable = false)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    
    @Column(name = "NOMBRE")
    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    @Column(name = "EMAIL")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Column(name = "PASS")
    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    
    
    

}
